翻訳と辞書
Words near each other
・ Anaphe reticulata
・ Anaphe stellata
・ Anaphe venata
・ Anaphe vuilleti
・ Anaphes nipponicus
・ Anaphes nitens
・ Anaphia
・ Anaphlebia
・ Anaphleps
・ Anaphlocteis
・ Anaphora
・ Anaphora (linguistics)
・ Anaphora (liturgy)
・ Anaphora (rhetoric)
・ Anaphora of the Apostolic Tradition
Anaphoric macro
・ Anaphosia
・ Anaphosia astrigata
・ Anaphosia aurantiaca
・ Anaphosia caloxantha
・ Anaphosia cyanogramma
・ Anaphosia eurygrapha
・ Anaphosia extranea
・ Anaphosia mirabilis
・ Anaphosia parallela
・ Anaphosia pectinata
・ Anaphrodisiac
・ Anaphylatoxin
・ Anaphylatoxin receptors
・ Anaphylaxis


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Anaphoric macro : ウィキペディア英語版
Anaphoric macro
An anaphoric macro is a type of programming macro that deliberately captures some form supplied to the macro which may be referred to by an ''anaphor'' (an expression referring to another). Anaphoric macros first appeared in Paul Graham's ''On Lisp''〔(Chapter 6 ) of Let over Lambda〕 and their name is a reference to linguistic anaphora〔—the use of words as a substitute for preceding words.
==Examples==
The loop macro in ANSI Common Lisp is anaphoric in that it binds it to the result of the test expression in a clause.〔(22. LOOP for Black Belts ) from Practical Common Lisp〕〔(What would be an example of an anaphoric conditional in Lisp? ) on StackOverflow
Here is an example that sums the value of non-nil elements, where ''it'' refers to the values of elements that do not equal nil:

(loop for element in '(nil 1 nil 2 nil nil 3 4 6)
when element sum it)
;; ⇒ 16

Here ''it'' is bound to the output of (and (> number 3) number) when true, collecting numbers larger than 3:〔(6.1.8.1 Examples of clause grouping ) from the Common Lisp HyperSpec

(loop for number from 1 to 6
when (and (> number 3) number)
collect it) ; IT refers to (and (> number 3) number).
;; ⇒ (4 5 6)


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Anaphoric macro」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.